from utils import general_settings
# 以下为连接配置，请勿随意更改
twitter_db = "twitter_db"
unprocessed_db = twitter_db

# url模板，有可能会变化，可考虑定时请求以检测变化
referer_url = 'https://twitter.com/search?q={0}%20since%3A{1}%20until%3A{2}&src=typed_query&f=live{3}'
keywords_url = 'https://twitter.com/i/api/2/search/adaptive.json?include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&include_mute_edge=1&include_can_dm=1&include_can_media_tag=1&include_ext_has_nft_avatar=1&skip_status=1' \
               '&cards_platform=Web-12&include_cards=1&include_ext_alt_text=true&include_quote_count=true&include_reply_count=1&tweet_mode=extended&include_entities=true&include_user_entities=true&include_ext_media_color=true&include_ext_media_availability=true&include_ext_sensitive_media_warning' \
               '=true&send_error_codes=true&simple_quoted_tweet=true&q={0}%20since%3A{1}%20until%3A{2}{3}&tweet_search_mode=live&count=20&query_source=typed_query&pc=1&spelling_corrections=1&ext=mediaStats%2ChighlightedLabel%2ChasNftAvatar%2CvoiceInfo%2CsuperFollowMetadata '
userinfo_url = 'https://twitter.com/i/api/graphql/cYsDlVss-qimNYmNlb6inw/UserByScreenName?variables=%7B%22screen_name%22%3A%22{0}%22%2C%22withSafetyModeUserFields%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%7D'
timeline_url = 'https://twitter.com/i/api/graphql/LoY0VIBL3DJcmJnmxUjMag/UserTweetsAndReplies?variables=%7B%22userId%22%3A%22{0}%22%2C%22count%22%3A20%2C%22{' \
               '1}withTweetQuoteCount%22%3Atrue%2C%22includePromotedContent%22%3Atrue%2C%22withCommunity%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Afalse%2C%22withUserResults%22%3Atrue%2C%22withBirdwatchPivots%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspective%22' \
               '%3Afalse%2C%22withSuperFollowsTweetFields%22%3Afalse%2C%22withVoice%22%3Atrue%7D '

# 以下为连接配置，请在task_manager使用前更改
# 本次任务所获取的结果需保存到的目标数据库
de_election_db = "de_election"
history_twitter_db = "de_election_history"
xj_twitter_db = 'xj_twitter_db'
mongodb_host = "10.10.69.38"
mongodb_port = 27017
target_db = twitter_db

# 首先设置任务类型
task_type = general_settings.TwitterConfig().task_type_search
# 如果是搜索关键词任务，则设置以下内容
# 本次任务所获取的结果需保存到的目标collection，如果为空则自动根据输入参数生成名称
data_collection = '2021_01'  # 2021-08-23_2021-08-29'
userinfo_collection = ''
unprocessed_collection = 'unparsed'
# 任务内容起始时间
start_date_str = '2021-01-01'
# 任务内容终止时间
end_date_str = '2021-01-31'
day_span = 2
latest = True
near_me = False
clear_exist_cmd = False
urgent = False
# 关键词请用英文逗号分开
# laschet | scholz | baerbock
# cdu | spd | fdp | afd (except forecast) | die linke | die grünen
# china,chinese | xinjiang,xuar,uygur,uyghur | hongkong,Hong Kong
# beijing  (winter,olympic,game,2022 ) until:2021-10-31 since:2021-01-01
# genocide,genocidal | taiwan,taiwanese,taipei,roc
# Bündnis 90,Die Grünen,GRÜNE
included_keywords = 'asdfgh'
must_keywords = ''
except_keywords = ''
# 搜索任务设置以上内容

# 如果是个人时间线任务，则设置以下内容
# uid:账户字符ID，start_date:起始日期，start_time:起始时间。日期和时间表示获取从时间点往后的全部推文。
user_list = [
    {'uid': 'hartgroup_org', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'MaherAl42750656', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'PierreKory', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'potus', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'DcyAustin', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'RGEHammond', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'MangroveForest', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'AnupamSharmaIFS', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'LadySpaulding11', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'TracyBethHoeg', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'MartinKulldorff', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'P_McCulloughMD', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'hanyusukiii', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'Covid19Critical', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'laworfiction', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'drlisamaria', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'abergthaler', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'ECMOKaragianni1', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'CatladyA', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
    , {'uid': 'che1899', 'start_date': '1900-10-01', 'start_time': '00:00:00'}
]
# 时间线任务设置以上内容
# 以上为连接配置，请在task_manager使用前更改

